<%@page import="ca.uvic.group2.ui.*"%>
<%@page import="ca.uvic.group2.api.*"%>
<%@page import="java.util.*"%>


<html>
<head>
<title>Set Buy Trigger</title>
<style>
body
{
        background-color: white;
}

form
{
        margin: 0px;
        padding: 0px;
}

.loginform
{
        border: 1px solid black;
        background-color: #ccc;
        width: 50%;
        margin-left: 25%;
        margin-right: 25%;
        margin-top: 10px;
}
.errorMessage
{
        border: 1px solid #990;
        background-color: #FFA;
        margin: 5px;
}
</style>

<script>
function setFocus() { }
</script>
</head>

<body onload="setFocus();">
<h1>StockServ Set Buy Trigger</h1>
<div class='loginform'>
<%
   Trigger r = (Trigger)request.getAttribute("trigger");
%>
<form action="stockserv" id="buyForm" name="buyForm">
<input type='HIDDEN' name='cmd' value='commitbuytrigger'>
<input type='HIDDEN' name='stock' value='<% out.print(r.stock); %>' >
<center><table>
        <tr>
                <th colspan=2>Set BUY Trigger</th>
        </tr>
        <tr>
                <td>Stock:</td>
                <td><% out.print(r.stock); %></td>
        </tr>
        <tr>
                <td>Purchase Amount: $</td>
                <td><% out.print(Float.toString(r.amount)); %></td>
        </tr>
        <tr>
                <td>Trigger Price: $</td>
                <td><input type='TEXT' name='price'></td>
        </tr>
        <tr>
                <td><input type='SUBMIT' value='Commit' onclick='document.buyForm.cmd.value="commitbuytrigger";'></td>
                <td><input type='SUBMIT' value='Cancel' onclick='document.buyForm.cmd.value="cancelbuytrigger";'></td>
        </tr>
</table></center>
</div>

</body>
</html>
